< previous page page_722 next page >

Page 722
To define a new ODBC data source, make sure that the User DSN tab is selected and click Add. The Create New Data Source dialog box appears. Select the Microsoft Access Driver (*.mdb) and click Finish. The ODBC Microsoft Access 97 Setup dialog box for creating a new ODBC data source then appears.
The Data Source Name field contains the string you use when you call the ODBC connection from your Visual Basic 5 program. The Description field just contains a comment to remind you of the contents of the data source. Enter ODBC API Test in the Data Source Name field and Testing the ODBC API Set in the Description field (see Figure 19.4).
0722-01.jpg
Figure 19.4.
Defining a new ODBC data source.
In the Database section, click Select to access the Select Database dialog box shown in Figure 19.5. Locate and select the C:\TYSDBVB5\SOURCE\CHAP19\TEST\SQLODBC.MDB database. This is the database your program connects to each time it calls the ODBC data source TYSODBC. Your screen now should resemble the one shown in Figure 19.5.
0722-02.jpg
Figure 19.5.
Setting the Database property of the ODBC.
Click OK to store the new data-source definition to the ODBC.INI file. You now should be able to see the ODBC API Test data source in the listbox in the first ODBC dialog box form.

 
< previous page page_722 next page >

If you like this book, buy it!